﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ExpenseSystem.Model;
using ExpenseSystem.Lor;
using ExpenseSystem.Common;
using ExpenseSystem.DataUpdater;
using ExpenseSystem.Fether;
using ExpenseSystem.Core.DataAddOn;

namespace ExpenseSystem.Core.SalesPointModules
{
    public class SalesPointEmployeeBaseManager : SalesPointEmployeeManager
    {
        public override bool Delete(SalesPointEmployeeModel SalesPointEmployee,  out string message)
        {
            SalesPointEmployeeFetcher fetcher = new SalesPointEmployeeFetcher();
            return updater.Remove(SalesPointEmployee, tran, fetcher, out message);
        }
        protected UserProfile userProfile = Authority.Authority.GetUserProfile();
        public override bool DeleteById( long[] SalesPointEmployee,  out string message)
        {
            SalesPointEmployeeFetcher fetcher = new SalesPointEmployeeFetcher();
            return updater.RemoveById(userProfile.SiteId, SalesPointEmployee, tran, fetcher, out message);
        }

        public override bool Save(SalesPointEmployeeModel SalesPointEmployee,  out string message, params IAddable<SalesPointEmployeeModel>[] addables)
        {
            SalesPointEmployeeFetcher fetcher = new SalesPointEmployeeFetcher();
            return updater.Save(SalesPointEmployee, tran, fetcher, out message);
        }
    }
}
